package com.njwb.day18.thd;

public class ThreadDemo01 {
    public static void main(String[] args) {
        MyThread myThread= new MyThread();
        //修改线程的名字
        myThread.setName("自己的线程");
        //线程的启动必须依靠start() =>run()
        myThread.start();

        MyRunable myRunable  = new MyRunable() ;


        Thread st = new Thread(myRunable);

        st.setName("打印偶数：");
        st.start();


        for(int i = 101;i<=200;i++) {
            System.out.println("主线程："+i);
        }


    }
}



